import Service from '@/common/service/service';
import RequestModel from "@/common/model/request.model";
import ResponseModel from '@/common/model/response.model';

/**
 * 数据字典管理
 */
export default class DictService {
    /**
     * 查询数据字典的树结果数据
     */
    public static findAllSysDataDict(params): Promise<ResponseModel> {
        return Service.get('sys/dataDict/findAllSysDataDict', params);
    };

    /**
     * 查询子节点
     */
    public static getDataDictTree(params): Promise<ResponseModel> {
        return Service.get('sys/dataDict/getDataDictTree', params);
    };

    /**
     * 查询字典子类列表
     */
    public static getPagedChildrenList(params): Promise<ResponseModel> {
        return Service.get('sys/dataDict/getPagedChildrenList', params);
    };

    /**
     * 新增数据字典
     */
    public static addSysDataDict(data): Promise<ResponseModel> {
        return Service.post('sys/dataDict/addSysDataDict', data);
    };

    /**
     * 修改数据字典
     */
    public static updateSysDataDict(data): Promise<ResponseModel> {
        return Service.post('sys/dataDict/updateSysDataDict', data);
    };

	/**
	 * 删除数据字典
	 */
	public static deleteSysDataDict(data): Promise<ResponseModel> {
		return Service.post('sys/dataDict/deleteSysDataDict', data);
	};

}
